<template>
    <div class="['com-button',type?type:'']" @click="onClick">
        <slot/>
    </div>
</template>

<script>
    export default{
        name: 'comButton',
        props:{
type:{
    type:String,
    required:false
}
        },
        methods:{
            onClick(e){
                console.log('===============')
                this.$emit('click',e)
            }
        }

    }
</script>
<style scoped lang="scss">
.com-button{
width: 80px;
    height:40px;
    background: rgb(204, 172, 14);
    border-radius: 5px;
    line-height: 40px;
    color: aliceblue;
    font-size: 10px;
cursor: pointer;
&:hover{
    background:  rgb(204, 172, 14);
}
&active{
    background: #FDFDFD;
}
}
</style>
